package com.securities.stock.service.impl;

import com.github.pagehelper.PageHelper;
import com.securities.stock.dao.StockDao;
import com.securities.stock.entity.pojo.Stock;
import com.securities.stock.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StockServiceImpl implements StockService {

    @Autowired
    private StockDao stockDao;


    public List<Stock> selectAll(){
        PageHelper.startPage(1, 10);
        PageHelper.orderBy("created desc ");
        return 	stockDao.selectAll();

    }

}
